home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Magnum One
/
Magnum One (Mid-American Digital) (Disc Manufacturing).iso
/
d18
/
opint102.5rc
/
D_MSG.PAS
< prev
next >
Wrap
Pascal/Delphi Source File
|
1988-12-04
|
3KB
|
119 lines
Program DemoMessage;
{***************************************************************************}
{* *}
{* O p u s I n t e r f a c e V e r 1.02 Demo Program. *}
{* *}
{* Opus V 1.0x Interface for Turbo Pascal Ver 4.0 *}
{* *}
{* These Structures,Procedures and Functions may help you to make OPUS *}
{* utilities for to help other SysOps, Please read the Documentation. *}
{* *}
{* Regards *}
{* Per Holm *}
{* *}
{* FIDO: Per Holm - Asgaard BBS 2:230/22.0 *}
{* UUCP: perholm@daimi.DK *}
{* *}
{***************************************************************************}
Uses
Dos,OPINT;
VAR
Msg: _Msg;
PROCEDURE Error;
VAR
Err: Integer;
BEGIN
Err:=OpIntERROR;
IF Err>0 THEN
BEGIN
Writeln('You Got Yourself an Error ',Err,' During OpInt Access');
Readln;
END;
END;
PROCEDURE Messages;
Var
i: Integer;
BEGIN
ReadMsg('1.MSG',Msg);
Error;
WriteMsg('2.msg',Msg);
Error;
WITH MSG DO
BEGIN
writeln('From .........: ',_From);
writeln('To ...........: ',_to);
writeln('Subject ......: ',_subj);
writeln('Date .........: ',_date);
writeln('Time .........: ',_Times);
writeln(_Dest,' ',_orig,' ',_cost);
readln;
FOR i:=1 to NumberOfLines DO
writeln(Lines[i]);
END;
END;
PROCEDURE SpeedTest;
VAR
i: Integer;
DT, DT2: DateTime;
BEGIN
writeln;
writeln('SPEED-TEST');
GetDateTime(DT);
FOR i:=1 TO 100 DO
BEGIN
ReadMsgHead('2.msg',Msg);
write(i:10,#13);
END;
GetDateTime(DT2);
Writeln(PackUnixDate(DT2)-PackUnixDate(DT),
' Sec. to read 100 Msg headers,');
GetDateTime(DT);
FOR i:=1 TO 100 DO
BEGIN
WriteMsgHead('2.msg',Msg);
write(i:10,#13);
END;
GetDateTime(DT2);
Writeln(PackUnixDate(DT2)-PackUnixDate(DT),
' Sec. to write 100 msg headers.');
GetDateTime(DT);
FOR i:=1 TO 100 DO
BEGIN
ReadMsg('1.msg',Msg);
write(i:10,#13);
END;
GetDateTime(DT2);
Writeln(PackUnixDate(DT2)-PackUnixDate(DT),
' Sec. to Read 100 messages.');
GetDateTime(DT);
FOR i:=1 TO 100 DO
BEGIN
WriteMsg('2.msg',Msg);
write(i:10,#13);
END;
GetDateTime(DT2);
Writeln(PackUnixDate(DT2)-PackUnixDate(DT),
' Sec. to Write 100 messages');
GetDateTime(DT);
END;
BEGIN
Messages;
readln;
SpeedTest;
ReadLn;
END.